/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Entities;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Cristian
 */
@Entity
@Table(name = "pyfntbactiproy")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Pyfntbactiproy.findAll", query = "SELECT p FROM Pyfntbactiproy p"),
    @NamedQuery(name = "Pyfntbactiproy.findByPyfntbactiproyid", query = "SELECT p FROM Pyfntbactiproy p WHERE p.pyfntbactiproyid = :pyfntbactiproyid")})
public class Pyfntbactiproy implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "pyfntbactiproyid")
    private Integer pyfntbactiproyid;
    @JoinColumn(name = "pyfntbactivpoaid", referencedColumnName = "pyfntbactivpoaid")
    @ManyToOne(optional = false)
    private Pyfntbactivpoa pyfntbactivpoaid;
    @JoinColumn(name = "pydgtbproyecid", referencedColumnName = "pydgtbproyecid")
    @ManyToOne(optional = false)
    private Pydgtbproyec pydgtbproyecid;

    public Pyfntbactiproy() {
    }

    public Pyfntbactiproy(Integer pyfntbactiproyid) {
        this.pyfntbactiproyid = pyfntbactiproyid;
    }

    public Integer getPyfntbactiproyid() {
        return pyfntbactiproyid;
    }

    public void setPyfntbactiproyid(Integer pyfntbactiproyid) {
        this.pyfntbactiproyid = pyfntbactiproyid;
    }

    public Pyfntbactivpoa getPyfntbactivpoaid() {
        return pyfntbactivpoaid;
    }

    public void setPyfntbactivpoaid(Pyfntbactivpoa pyfntbactivpoaid) {
        this.pyfntbactivpoaid = pyfntbactivpoaid;
    }

    public Pydgtbproyec getPydgtbproyecid() {
        return pydgtbproyecid;
    }

    public void setPydgtbproyecid(Pydgtbproyec pydgtbproyecid) {
        this.pydgtbproyecid = pydgtbproyecid;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (pyfntbactiproyid != null ? pyfntbactiproyid.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Pyfntbactiproy)) {
            return false;
        }
        Pyfntbactiproy other = (Pyfntbactiproy) object;
        if ((this.pyfntbactiproyid == null && other.pyfntbactiproyid != null) || (this.pyfntbactiproyid != null && !this.pyfntbactiproyid.equals(other.pyfntbactiproyid))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Entities.Pyfntbactiproy[ pyfntbactiproyid=" + pyfntbactiproyid + " ]";
    }
    
}
